﻿
using Microsoft.Extensions.DependencyInjection;

using Xc.Builds.MasterTools.Views;
using Xc.Views.Core;

namespace Xc.Builds.NbTools
{
    [Boot("维护工具")]
    public class StartUp:ApplicationBooster<AppSetting>
    {
        protected override void BeforeBuild(IServiceCollection serviceDescriptors)
        {
            serviceDescriptors.AddTransient<MainView>();
            serviceDescriptors.AddSingleton(new Xc.Logics.AepCoap.StartUp().GetMainElement<Xc.Logics.AepCoap.Views.MainView>());
            serviceDescriptors.AddSingleton(new Xc.Logics.OneNet.StartUp().GetMainElement<Xc.Logics.OneNet.Views.MasterView>());
            serviceDescriptors.AddSingleton(new Xc.Logics.HyperTerminalCore.Tcp.StartUp().GetMainElement());
            serviceDescriptors.AddSingleton(new Xc.Logics.HyperTerminalCore.Udp.StartUp().GetMainElement());
            base.BeforeBuild(serviceDescriptors);
        }
    }
}
